package com.monbo.proj.lifangcrm.controller;

import com.monbo.proj.lifangcrm.service.PdfCombinerService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;


/**
 * PDF合成控制器
 *
 * @author lirui
 * @date 2025/09/22
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/pdf")
public class PdfCombinerController {

    private final PdfCombinerService pdfCombinerService;

    /**
     * 合成
     *
     * @param id id
     * @return {@link String }
     * @throws IOException ioexception
     */
    @RequestMapping("/combine/{id}")
    public String combine(@PathVariable String id) throws IOException {
        return pdfCombinerService.combine(id);
    }

}
